//
// Created by fazhehy on 2024/6/7.
//

#include "voltage.h"

uint16_t adc_value[5] = {0};

void adc_init()
{
    HAL_ADCEx_Calibration_Start(&hadc1);
    HAL_TIM_Base_Start_IT(&htim3);
    HAL_ADC_Start_DMA(&hadc1, (uint32_t *)adc_value, 5);
}

void adc_show()
{
    printf("%d, %d, %d, %d, %d\n", adc_value[0], adc_value[1], adc_value[2], adc_value[3], adc_value[4]);
}
